/*
  ==============================================================================

    RMS.h
    Created: 15 Feb 2015 12:12:38pm
    Author:  Alistair Barker

  ==============================================================================
*/

#ifndef RMS_H_INCLUDED
#define RMS_H_INCLUDED

#include "../JuceLibraryCode/JuceHeader.h"


class RMS 
{
public:
    RMS();
    double calculateRMS(double input);
    void setBufferSize(int size) {buffer.setSize(1, size);} ;
    int getBufferSize(){return buffer.getNumSamples();};
private:
    AudioSampleBuffer buffer;
    int writePtr;
};



#endif  // RMS_H_INCLUDED
